package com.prolificinteractive.materialcalendarview.format;

import org.threeten.bp.DayOfWeek;
import org.threeten.bp.format.TextStyle;

import java.util.Locale;

/**
 * Format the day of the week with using {@link TextStyle#SHORT} by default.
 *
 * @see java.time.DayOfWeek#getDisplayName(java.time.format.TextStyle, Locale)
 */
public final class CalendarWeekDayFormatter implements WeekDayFormatter {
    /**
     * format
     *
     * @param dayOfWeek the day of the week as returned by {@linkplain DayOfWeek#getValue()}.
     * @return return
     */
    @Override
    public CharSequence format(final DayOfWeek dayOfWeek) {
        return dayOfWeek.getDisplayName(TextStyle.SHORT, Locale.getDefault());
    }
}
